{extend name="base" /}
{block name="css"}
<link rel="stylesheet" href="https://paidou.cdn.dgyunju.cn/css/download.css?v={$version|default=1}">
<link rel="stylesheet" href="https://paidou.cdn.dgyunju.cn/fonts/iconfont.css?v={$version|default=1}">
<link rel="stylesheet" href="https://paidou.cdn.dgyunju.cn/css/common.css?v=v={$version|default=1}">
{/block}
{block name="content"}
<div id="container">
    <div id="header"></div>
    <div id="rightside"></div>
    <div class="banner">
        <img class="image" src="https://paidou.cdn.dgyunju.cn/image/download.png" alt="">
        <div class="img-word">
            <h1 class="word-title">{:lang('downloads')}</h1>
            <p class="word-en">CORPORATE NEWS</p>
            <p class="word-content">{$config['page_download_tip']|default=''}</p>
        </div>
    </div>
    <div id="content">
        <div class="download">
            <h2 class="top">
                {:lang('downloads')}
            </h2>
            <div class="long-line">
            </div>
            <form class="search" method="get" >
                <input class="input" placeholder="" value="{$keyword|default=''}" type="text" name="keyword">

                <select class="select-coup" name="type">
                    <option value="1" >{:lang('type of product')}</option>
                    <option value="2" {if $type == 2} selected {/if}>{:lang('solution')}</option>
                </select>
                <button class="btn" type="submit">{:lang('search')}</button>
            </form>
            {notempty name="list"}
            {if $list['total']>0}
            {foreach $list['data'] as $vo}
                    <div class="box">
                        <div class="top-flex">
                            <div class="left">
                                {$vo['title']}
                            </div>
                            <div class="right" >
                                <span class="fi fi-xiajiantou"></span>
                            </div>
                        </div>
                        <div class="box-list">
                            {foreach $vo['downloads'] as $d}
                            <div class="box-list-one">
                                <a href="{$d['file_path']}" style="color: black">
                               {$d['title']}<span class="fi fi-cangpeitubiao_xiazaipandiandanxiazaidayinmoban"></span>
                                </a>
                            </div>
                            {/foreach}
                        </div>
                    </div>
            {/foreach}
            {else}
            <div class="no-data">
                <i class="fi fi-kongzhuangtai"></i>
                <p>{:lang('no_data')}~</p>
            </div>
            {/if}
            {/notempty}
            <div id="pagination" class="l-page">
            </div>
        </div>
    </div>
    <div id="footer"></div>
</div>
{/block}
{block name="script"}
<script src="https://paidou.cdn.dgyunju.cn/js/pagination.min.js"></script>
<script>
    $(document).ready(function(){
        $(".top-flex .right").click(function(e){
            $(this).parent().siblings().fadeToggle()
            $(this).children().toggleClass("fi-xiajiantou fi-shangjiantou")
        });
        $("#pagination").pagination({
            currentPage:{$list['total']|default=1},
            totalPage:{$list['totalPage']|default=1},
            /*是否显示首页、尾页 true：显示 false：不显示*/
            isShow:true,
            /*分页条显示可见页码数量*/
            count:10,
            /*第一页显示文字*/
            homePageText:"{:lang('homePageText')}",
            /*最后一页显示文字*/
            endPageText:"{:lang('endPageText')}",
            /*上一页显示文字*/
            prevPageText:"{:lang('prevPageText')}",
            /* 下一页显示文字*/
            nextPageText:"{:lang('nextPageText')}",
            /*点击翻页绑定事件*/
            callback: function(page) {
                window.location.href = "{:url('/download',['keyword'=>$keyword,'type'=>$type])}&page="+page;
            }
        });
    });
</script>
{/block}